from django.db import models

# Create your models here.
class UserInfo(models.Model):
	username = models.CharField(max_length=32)
	password = models.CharField(max_length=32)
	phone_number = models.CharField(max_length=18)
	part = models.ManyToManyField('Part')
	ui = models.OneToOneField("UserDetail")
class UserDetail(models.Model):
	sex=models.CharField(max_length=64)
	addr=models.CharField(max_length=64)
class Part(models.Model):
	name=models.CharField(max_length=32)
class userimg(models.Model):
	name = models.CharField(max_length=32)
	pawd = models.CharField(max_length=32)
	avatar = models.FileField(upload_to='static/img/', default='static/img/cuowu.png', verbose_name='用户头像')

